{% extends "layout.html" %}
{% block body %}
<div class="page-header">
          <h1>DJ - Producer - Computer Scientist</h1>
        </div>
        <div class="row">
          <div class="span10">
             <h2>Flaskr</h2>
             <h3>       
              {% for message in get_flashed_messages() %}
                <div class=flash>{{ message }}</div>
              {% endfor %}
              </h3>
              
  {% if session.logged_in %}
    <form action="{{ url_for('add_entry') }}" method=post class=add-entry>
      <dl>
        <dt>Title:
        <dd><input type=text size=30 name=title>
        <dt>Text:
        <dd><textarea name=text rows=5 cols=40></textarea>
        <dd><input type=submit value=Share>
      </dl>
    </form>
  {% endif %}
  <ul class=entries>
  {% for entry in entries %}
    <li><h2>{{ entry.title }}</h2>{{ entry.text|safe }}
  {% else %}
    <li><em>Unbelievable.  No entries here so far</em>
  {% endfor %}
  </ul>
{% endblock %}